package org.yinweichen.llm_dataset_backend.repository;

import org.yinweichen.llm_dataset_backend.entity.LlmAnswer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LlmAnswerRepository extends JpaRepository<LlmAnswer, Long> {
    List<LlmAnswer> findByModelAndQuestionId(String model, Long questionId);
    List<LlmAnswer> findByModel(String model);
    List<LlmAnswer> findByQuestionId(Long questionId);
    List<LlmAnswer> findAllByTaskId(Long taskId);
    List<LlmAnswer> findByModelAndQuestionIdAndVersion(String model, Long questionId, String version);
    List<LlmAnswer> findByModelAndVersion(String model, String version);
    List<LlmAnswer> findByQuestionIdAndVersion(Long questionId, String version);
    List<LlmAnswer> findByVersion(String version);
}